package com.hzsai.pojo;

import java.util.ArrayList;
import java.util.List;

/**
 * hzsai 2019/7/25
 * usage:
 **/
public class Page<T> {

    private List<T> dataList = new ArrayList<T>();


    // select * from table_name where id >= (select id from table_name limit start_num, 1) limit page_size;
    private int Count; // 数据总条数
    private int currentPage = 1; // 当前页码
    private int totalPage; // 总页数
    private int pageSize = 5; // 初始每页大小

    public Page() {
    }

    public Page(int count, int currentPage) {
        Count = count;
        this.currentPage = currentPage;
    }

    public List<T> getDataList() {
        return dataList;
    }

    public void setDataList(List<T> dataList) {
        this.dataList = dataList;
    }

    public int getCount() {
        return Count;
    }

    public void setCount(int count) {
        Count = count;
    }

    public int getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(int currentPage) {
        this.currentPage = currentPage;
    }

    public int getTotalPage() {
        return totalPage;
    }

    public void setTotalPage(int totalPage) {
        this.totalPage = totalPage;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }
}
